package com.trendit.print.sdk.models.printer;

import com.trendit.print.sdk.DaquObject;
import com.trendit.print.sdk.DaquRequest;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * 查询打印请求的处理结果（需要您将我平台返回的printId保存起来）
 */
public class GetPrintResultRequest implements DaquRequest<GetPrintResultResponse> {

    private DaquObject bizModel;

    /**
     * 构造方法
     * @param bizModel
     */
    public GetPrintResultRequest(GetPrintResultRequest.Model bizModel) {
        this.bizModel = bizModel;
    }

    @Override
    public String getApiMethodName() {
        return "openapi.getPrintResult";
    }

    @Override
    public String getApiVersion() {
        return "1.0";
    }

    @Override
    public String getNotifyUrl() {
        return null;
    }

    @Override
    public String getApiMethodURL() {
        return "/openapi/get_print_result";
    }

    @Override
    public Class<GetPrintResultResponse> getResponseClass() {
        return GetPrintResultResponse.class;
    }

    @Override
    public DaquObject getBizModel() {
        return bizModel;
    }

    @Override
    public String getBizContent() {
        return null;
    }

    @Data
    public static class Model extends DaquObject {
        /**
         * 设备编码
         */
        @NotBlank
        private String sn;

        /**
         * 先拿到打印回执ID
         */
        @NotNull
        private Long printId;

    }
}
